#!/usr/bin/python3
# coding: utf-8
import gevent.monkey
import multiprocessing

gevent.monkey.patch_all()

bind = '0.0.0.0:9000'
# restart workers when code change, only use in development
#reload = True
preload_app = True
# debug when development and error when production
loglevel = '/srv/flask-app/log/gunicorn_error'
logfile = '/srv/flask-app/log/gunicorn_debug.log'
accesslog = '/srv/flask-app/log/gunicorn_access.log'
access_log_format = '%(h)s %(t)s %(U)s %(q)s'
# errorlog = 'error.log'
# process name
proc_name = 'vservice' 
pidfile = '/srv/flask-app/log/gunicorn.pid'
# set process daemon, not use in default
# daemon = True
# number of processes
workers = multiprocessing.cpu_count()*2 + 1
# number of threads of per process
threads = multiprocessing.cpu_count()*2
worker_class = 'gevent'